<template>
  <div style="" @click="toggleClick">
    <svg
      :class="{'is-active':isActive}"
      class="hamburger"
      viewBox="0 0 1024 1024"
      xmlns="http://www.w3.org/2000/svg"
      width="64"
      height="64"
    >
      <path d="M567.528214 501.958623l-247.526961-247.526962 82.505646-82.50564701 330.04263 330.03260901-330.04263 330.04262999-82.505646-82.51566799 247.526961-247.526962z" />
    </svg>
  </div>
</template>

<script>
export default {
  name: 'Hamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    toggleClick() {
      this.$emit('toggleClick')
    }
  }
}
</script>

<style scoped lang="scss">
.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 25px;
  height: 25px;
  transform: rotate(90deg);
  font-size: 24px;
  fill: #aaa;
  position: relative;
  left: 25px;
  top: -20px;
}

.hamburger.is-active {
  transform: rotate(-90deg);
}
</style>
